package com.sz.biz.rpt.service.impl;

import com.sz.biz.rpt.entity.RptCalcJob;
import com.sz.biz.rpt.service.RptCalcJobService;
import com.sz.common.base.service.AbstractService;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * Function: //TODO ADD FUNCTION. <br>
 * Date: 2017年12月05日 15:04 <br>
 * Author: wentao.chang
 */
@Service
public class RptCalcJobServiceImpl extends AbstractService implements RptCalcJobService {
    @Override
    public int save(RptCalcJob rcj) {
        return dao.save("RptCalcJobMapper.insert", rcj);
    }

    @Override
    public int delete(int id) {
        return dao.delete("RptCalcJobMapper.deleteById", id);
    }

    @Override
    public RptCalcJob findById(int id) {
        return (RptCalcJob) dao.findForObject("RptCalcJobMapper.selectById", id);
    }



    @Override
    public RptCalcJob findByDate(Date dayBegin) {
        return (RptCalcJob) dao.findForObject("RptCalcJobMapper.findByDate", dayBegin);
    }

    @Override
    public void deleteByDate(Date dat) {
        dao.delete("RptCalcJobMapper.deleteByDate", dat);
    }
}
